using lucere.index.read;
namespace lucere.analysis.enumerator
{
    /// <summary>
    /// Contract for enumerating a subset of all terms. 
    ///<p>Term enumerations are always ordered by Term.compareTo().  Each term in
    ///the enumeration is greater than all that precede it.</p>
    /// </summary>
    public interface IFilteredTermEnumerator : ITermEnumerator
    {
        /// <summary>
        /// the delegate enumerator.
        /// </summary>
        ITermEnumerator ActualEnumerator { get; set; }

        /// <summary>
        /// Equality compare on the term.
        /// </summary>
        /// <param name="term"></param>
        /// <returns></returns>
        bool TermCompare(ITerm term);

        /// <summary>
        /// Equality measure on the term.
        /// </summary>
        /// <returns></returns>
        float Difference();

        /// <summary>
        /// Indicates the end of the enumeration has been reached.
        /// </summary>
        /// <returns></returns>
        bool EndEnum();
    }
}